home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_02
/
1002014b
< prev
next >
Wrap
Text File
|
1991-12-15
|
323b
|
16 lines
Listing 2 -- the file rename.c
/* rename function -- UNIX version */
#include "xstdio.h"
/* UNIX system calls */
int _Link(const char *, const char *);
int _Unlink(const char *);
int (rename)(const char *old, const char *new)
{ /* rename a file */
return (_Link(old, new) ? -1 : _Unlink(old));
}